// React 组件
import React from 'react';
import './index.less';
import { LeftOutlined } from '@ant-design/icons';
import { Button } from 'antd';

export default function render() {
  const { title, showMore, actionDom, children, backUrl } = this.props
  const { titleInfo } = this.state
  return (
    <div className="common-container-title">
      <div className="common-title-main">
        {
          backUrl ? (
            <div className="common-title-more" onClick={this.back.bind(this)}>
              <Button type="link" className="clear-padding" style={{paddingRight: 0}} title='返回'>
                <LeftOutlined></LeftOutlined>
              </Button>
            </div>
          ) :
          titleInfo.icon || children
        }
        <span className="common-title-text">{titleInfo.title || title || ''}</span>
      </div>
      {showMore && (
        <div className="common-title-more">
          <span className="common-title-more-link">
            更多
          </span>
        </div>
      )}
      {
        actionDom
      }
    </div>
  );
}


